from selenium.webdriver.common.by import By
from base import Base
class Page(Base):
    def sou1(self):
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜商品名称 作者 出版社 ISBN")')
        ele=self.find_ele(loc)
        return ele
    def sou2(self):
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    def sou3(self):
        loc=(By.ID,'com.kongfz.app:id/tvSearch')
        ele=self.find_ele_wait(loc)
        return ele
    def tu1(self):
        loc=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.kongfz.app:id/ivPic"])[7]')
        ele=self.find_ele(loc)
        return ele
    def jrgwc(self):
        loc=(By.ID,'com.kongfz.app:id/tvAddCart1')
        ele=self.find_ele(loc)
        return ele
    def dy1(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="西游记"]')
        ele=self.find_ele(loc)
        return ele
    def dy2(self):
        loc=(By.XPATH,'//android.widget.TextView[@text="简爱"]')
        ele=self.find_ele(loc)
        return ele